package com.future

class User {
  String userName
  String password
  String sex
  int age
  String address
  String province
  String city
  String phone
  String email
  String qq
  String msn
  String webAddress
  String work//行业
  String country
  String ip
  Date dateCreated
  Date lastLoginDate
  static hasMany=[tasks:Task,evaluaton:Evaluation]
  static mapping = {
    columns {

    }
  }
  static constraints = {
    userName(blank: false, size: 6..25, unique: true)
    password(password: true, blank: false, size: 6..60)
    age(max: 99,nullable:true)
    sex(inlist: ['boy', 'girl'],nullable:false)
    email(email: true,nullable:false,blank:false)
    webAddress(url: true,nullable:true)
    work(nullable:true)
    phone(nullable:true)
    city(nullable:true)
    country(nullable:true)
    address(nullable:true)
    province(nullable:true)
    qq(nullable:true)
    msn(nullable:true)
  }
}
